GtkListBox: fix model binding refcount issue
authorRyan Lortie <desrt@desrt.ca>
Fri, 27 Mar 2015 15:57:38 +0000 (11:57 -0400)
committerRyan Lortie <desrt@desrt.ca>
Fri, 27 Mar 2015 16:07:17 +0000 (12:07 -0400)
commit6e03e7e80a630c9f7ef3d55130c3abde97ac3012
tree7175fd3d23bb54943b6cc6699dccf84d1e8123f0
parent36baf9207ed87ec669014a51385b6194cccda3a5
GtkListBox: fix model binding refcount issue

As it is, GtkListBox model binding will work nicely as long as your
create_widget_func returns a floating reference on the newly-created
widget.

If you try to return a full reference (as any higher-level language
would do) then you will leak that reference.

Fix that up by converting any floating references into full references
and then unconditionally releasing the full reference after adding to
the box.

https://bugzilla.gnome.org/show_bug.cgi?id=746893
gtk/gtklistbox.c